<?php

	/**
	 * @see Bike_Form_Renderer_ExtJs_Field_Validate_Abstract
	 */
	require_once 'Bike/Form/Renderer/ExtJs/Field/Validate/Abstract.php';
	
	
	class Bike_Form_Renderer_ExtJs_Field_Validate_Between extends Bike_Form_Renderer_ExtJs_Field_Validate_Abstract
	{		public function getSettings()
		{			$settings = array();
			$inclusive = $this->getValidator()->getInclusive();
			if($inclusive)
			{
				if(!is_null($this->getValidator()->getMin()))
				{					$settings['minValue'] = $this->getValidator()->getMin();
				}
				if(!is_null($this->getValidator()->getMax()))
				{
					$settings['maxValue'] = $this->getValidator()->getMax();
				}
			}
			else
			{				if(!is_null($this->getValidator()->getMin()))
				{
					$settings['minValue'] = $this->getValidator()->getMin() + 0.001;
				}
				if(!is_null($this->getValidator()->getMax()))
				{
					$settings['maxValue'] = $this->getValidator()->getMax() - 0.001;
				}
			}
			return $settings;
		}
	}
